//
//  TopBarCell.m
//  网易新闻头部V2
//
//  Created by qianfeng on 15/9/24.
//  Copyright (c) 2015年 孔令涛. All rights reserved.
//

#import "TopBarCell.h"
#import "UIKit+AFNetworking.h"

@implementation TopBarCell


-(void)setModel:(TopBarModel *)model
{
    _model = model;
    //更新子空间内容
    [_imgView setImageWithURL:[NSURL URLWithString:model.image_url_small]];
    _titleLabel.text = model.title;
    _introduceLabel.text = model.summary;
}

+(id)cellForRowWithTableView:(UITableView *)tableView
{
    NSString * className = NSStringFromClass([self class]);
    
    UINib * nib = [UINib nibWithNibName:className bundle:nil];
    [tableView registerNib:nib forCellReuseIdentifier:className];
    
    //如果有可重用的返回,如果没有可重用的创建一个新的返回
    return [tableView dequeueReusableCellWithIdentifier:className];
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];


    // Configure the view for the selected state
}

@end
